package com.maxlen.member.entity.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserRegisterVO {

    @NotBlank(message = "用户名必须提交")
    @Length(min = 3, max = 10, message = "用户名必须是3-10位")
    private String username;

    @NotBlank(message = "密码必须提交")
    @Length(min = 6, max = 20, message = "密码必须是6-20位")
    private String password;

    @NotBlank(message = "手机号必须提交")
    @Pattern(regexp = "^1[3|4|5|7|8][0-9]{9}$")
    private String phone;

    @NotBlank(message = "验证码必须提交")
    @Length(min = 6, max = 6, message = "验证码必须是6位")
    private String code;

}
